/* 分页公共函数*/
module.exports = handlePages = (currentPage, pageSize, total) => {
    let start = total > 0 ? ((currentPage - 1) * pageSize + 1) : 0;
    let end = currentPage * pageSize <= total ? currentPage * pageSize : total;
    return {
        currentPage,
        pageSize,
        total,
        start,
        end
    }
}